--- xavs/Makefile.orig	2011-07-01 20:23:47.000000000 +0200
+++ xavs/Makefile	2011-07-01 21:16:09.407118004 +0200
@@ -59,8 +59,8 @@
 $(SONAME): .depend $(OBJS) $(OBJASM)
 	$(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SOFLAGS) $(LDFLAGS)
 
-xavs$(EXE): $(OBJCLI) libxavs.a 
-	$(CC) -o $@ $+ $(LDFLAGS)
+xavs$(EXE): $(OBJCLI) $(SONAME)
+	$(CC) -o $@ $(OBJCLI) $(LDFLAGS) -L. -lxavs
 
 xavsvfw.dll: libxavs.a $(wildcard vfw/*.c vfw/*.h)
 	make -C vfw/build/cygwin
